#ifndef HISTRINGINL_HPP
#define HISTRINGINL_HPP

#include <string.h>

/*
 *  HIString-inl.hpp
 *  
 *
 *  Created by Rasmus Kyng on 30/01/2011.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */

namespace hi {
	inline bool prefixComp(int prefixLen, char* str1, char* str2) {
		for (int i=0; i<prefixLen; i++) {
			if (str1[i] == str2[i]) continue;
			return false;
		}
		return true;
	}
	
	inline char* strAppend_orphanOut( const char* strOne, const char* strTwo ) {
		char* resultStr = (char*) malloc(strlen(strOne) + strlen(strTwo) + 1);
		strcpy(resultStr, strOne);
		strcat(resultStr, strTwo);
		return resultStr;
	}
}


#endif
